home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 3 / The Pier Shareware Number 3 (The Pier Exchange) (1993).iso / 005 / ghost3.exe / GHOSTLOG.EXE / GHOSTLOG.WAS < prev    next >
Text File  |  1993-09-12  |  2KB  |  59 lines

  1. ; GHOST BBS 3.00 log on script
  2. ; Copyright (C) 1993 Gregg Hommel All rights reserved
  3.  
  4. ; nothing fancy, just logs a user on to GHOST BBS 3.00. If the "- More [S 
  5. ; to stop] -" prompt appears, the user must respond, depending on 
  6. ; whether he wants to read the NEWS file or not. When you get to the 
  7. ; main menu of GHOST BBS or if there is new mail, the script will stop.
  8.  
  9. ; to use this script, create a dialing directory entry for the GHOST 
  10. ; BBS you wish to call, and put your GHOST name and password in the 
  11. ; appropriate fields of the dialing directory entry. This script will 
  12. ; pick them up from there. Replace the #DEFINE statments below with the
  13. ; response you want to make for the language and/or ANSI prompts, and
  14. ; compile this script.
  15.  
  16. integer watchfor
  17. string prompt_str
  18.  
  19. #DEFINE LANGRESP   "^M"
  20. #DEFINE ANSIRESP   "Y^M"
  21.  
  22. proc main
  23.  
  24.    when target 0 "?" call handle_it
  25.    when target 1 "- More" call stop_here
  26.  
  27.    watchfor = 1
  28.    while watchfor
  29.    endwhile
  30.  
  31.    exit
  32.  
  33. endproc
  34.  
  35. proc handle_it
  36.    termgets $ROW 0 prompt_str $COL
  37.  
  38.    if strfind prompt_str "[Enter]=no change"
  39.       transmit LANGRESP
  40.    elseif strfind prompt_str "ANSI"
  41.       transmit ANSIRESP
  42.    elseif strfind prompt_str "FIRST"
  43.       transmit $USERID
  44.       transmit "^M"
  45.    elseif strfind prompt_str "Password"
  46.       transmit $PASSWORD
  47.       transmit "^M"
  48.    elseif strfind prompt_str "it now"
  49.       watchfor = 0
  50.    elseif strfind prompt_str "Command"
  51.       watchfor = 0
  52.    endif
  53.  
  54. endproc
  55.  
  56. proc stop_here
  57.    watchfor = 0
  58. endproc
  59.